Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #5217 - Review RoundRobinConnectionPool #5219

Merged
merged 2 commits into from
Sep 9, 2020

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Sep 1, 2020

Introduced IndexedConnectionPool and RandomConnectionPool.
Clarified semantic of RoundRobinConnectionPool.

Signed-off-by: Simone Bordet simone.bordet@gmail.com

Introduced IndexedConnectionPool and RandomConnectionPool.
Clarified semantic of RoundRobinConnectionPool.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet sbordet requested review from gregw and lorban September 1, 2020 11:11
@sbordet sbordet linked an issue Sep 1, 2020 that may be closed by this pull request

private final Pool<Connection> pool;

public IndexedConnectionPool(HttpDestination destination, int maxConnections, boolean cache, Callback requester, int maxMultiplex)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the cache should be forced to false, otherwise you risk reaching a steady state where one thread continuously uses the connection at the same index.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there shouldn't be a cache and it should be replaced by round robin: see #5218

Updates after review.
Fixed broken tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Copy link
Contributor

@lorban lorban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge it. 👍

@sbordet sbordet merged commit 01135e1 into jetty-9.4.x Sep 9, 2020
@sbordet sbordet deleted the jetty-9.4.x-5217-round_robin_pool branch September 9, 2020 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review RoundRobinConnectionPool
4 participants